package com.caigou.comm.base.ext

import android.content.Context
import android.widget.Toast
import androidx.fragment.app.Fragment

/**
 * @author #Suyghur.
 * Created on 2021/09/28
 */

fun Fragment.showToast(content: String): Toast {
    val toast = Toast.makeText(requireActivity().applicationContext, content, Toast.LENGTH_SHORT)
    toast.show()
    return toast
}

fun Context.showToast(content: String): Toast {
    val toast = Toast.makeText(this.applicationContext, content, Toast.LENGTH_SHORT)
    toast.show()
    return toast
}